package com.cehome.cloudbox.enums;
/**
 * 流程意见类型
 *
 */
public enum ProcCommentTypeEnum {

    /**
     * 说明
     */
    APPLY("1", "申请"),
    AGREE("2", "同意"),
    REJECT("3", "拒绝"),
    REVOKE("4", "撤回"),
    ASSIGN("5", "转办"),
    STOP("6", "终止流程"),
    ACTIVATE("7", "激活"),
    SUSPEND("8", "挂起"),
    CANCEL("9", "取消流程");

    /**
     * 类型
     */
    private final String type;

    /**
     * 说明
     */
    private final String remark;

    ProcCommentTypeEnum(String type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    /**
     * 通过类型获取说明
     *
     * @param type 类型
     * @return 说明
     */
    public static String getRemarkByType(String type) {
        for (ProcCommentTypeEnum typeEnum : ProcCommentTypeEnum.values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum.getRemark();
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public String getRemark() {
        return remark;
    }
}
